<template>
    <div>
        <el-button v-if="props.modelValue" type="info" @click="downLoadFileByFolderId(props.modelValue)">
            <el-icon v-if="state.loading" class="is-loading">
                <elementLoading />
            </el-icon>
            {{state.loading == true?'下载中...':'下载'}}
        </el-button>
        <text v-else>暂无资料</text>
    </div>
</template>

<script lang="ts" setup>
    import {reactive} from "vue";
    import {downLoadFileByFolderId} from "/@/components/wigem/downFile";

    const props = defineProps({
        modelValue: {
            type: String,
            default: ""
        }
    });
    const state = reactive({
        loading: false,
    });
</script>

<style lang="scss" scoped>

</style>
